/*
 *  a little POV for the Arduino
 */
 
// Set LED Pins
int pin5 = 12;
int pin4 = 11;
int pin3 = 7;
int pin2 = 6;
int pin1 = 2;

// Set ColTime in ms
int colTime=3;

byte B[] = {1,1,1,1,1, 0,0,1,0,1, 0,0,1,1,1};
byte I[] = {1,1,1,1,1, 0,0,0,0,0, 0,0,0,0,0};
byte E[] = {1,1,1,1,1, 1,0,1,0,1, 1,0,0,0,1};
byte R[] = {1,1,1,1,1, 1,0,1,0,0, 1,1,0,1,1};
byte ALL[]= {1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1};
byte _[] = {0,0,0,0,0, 0,0,0,0,0,  0,0,0,0,0};
byte t1[] = {1,0,0,0,0, 0,1,0,0,0,  0,0,1,0,0};


void setup()
{
  for(int f=0;f<13;f++){
    pinMode(f, OUTPUT);
    }
}

void loop()
{
   writeLetter(B);
   writeLetter(I);
   writeLetter(E);
   writeLetter(R);
   writeLetter(_);   
}

void writeLetter(byte letter[])
{
  int i=0;
  
    digitalWrite(pin1, letter[i++]);
    digitalWrite(pin2, letter[i++]);
    digitalWrite(pin3, letter[i++]);
    digitalWrite(pin4, letter[i++]);
    digitalWrite(pin5, letter[i++]);
 delay(colTime);
    

    digitalWrite(pin1, letter[i++]);
    digitalWrite(pin2, letter[i++]);
    digitalWrite(pin3, letter[i++]);
    digitalWrite(pin4, letter[i++]);
    digitalWrite(pin5, letter[i++]);
 delay(colTime);

    digitalWrite(pin1, letter[i++]);
    digitalWrite(pin2, letter[i++]);
    digitalWrite(pin3, letter[i++]);
    digitalWrite(pin4, letter[i++]);
    digitalWrite(pin5, letter[i++]);
 delay(colTime);
 
  for(int i=0;i<13;i++){
    digitalWrite(i, LOW);
    }

  delay(colTime*2);
}
